//
//  DealViewController.m
//  futureLive
//
//  Created by zhoubiwen on 15/11/17.
//  Copyright © 2015年 ZHOU_LI_SUN. All rights reserved.
//

#import "DealViewController.h"
#import "DealView.h"
@interface DealViewController ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation DealViewController


static DealViewController *manager = nil;
+ (DealViewController *)defaultDealViewController {
    @synchronized(self) {
        if (!manager) {
            manager = [[DealViewController alloc]init];
        }
    }
    return manager;
}

- (void)loadView {
    [super loadView];
    self.view = [DealView item];
    
    
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.translucent = NO;

}

- (void)viewWillDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    self.navigationController.navigationBar.translucent = YES;
    

}
- (void)viewDidLoad {
    [super viewDidLoad];
    [self initData];
    [self initSubViews];
}
/**
 *  初始化数据
 */
- (void)initData {
    
    
}
/**
 *  初始化子视图
 */
- (void)initSubViews {
    DealView *view = (DealView *)self.view;
    view.tableView.delegate = self;
    view.tableView.dataSource = self;
    [view.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
}

#pragma mark - UITableViewDataSource

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return 3;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    cell.textLabel.text = @"11111";
    return cell;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
